@extends('admin.layout.layout')
@section('title','品牌修改')
@section('content')
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">品牌修改</h1>
            </div>
            <!-- /.col-lg-12 -->
        
		     <div class="col-lg-8 col-lg-offset-2">
		     		@if (count($errors) > 0)
		    <div class="alert alert-danger">
		        <ul>
		            @foreach ($errors->all() as $error)
		                <li>{{ $error }}</li>
		            @endforeach
		        </ul>
		    </div>
					@endif
			</div> 
	        <div class="col-lg-8 col-lg-offset-2">
	            <div class="panel panel-default">
	              	<div class="panel-body">
	                    <div class="row">
	                        <div class="col-lg-8 col-lg-offset-2">
	                            <form  method="post" action="{{url('/admin/brand/update')}}" enctype="multipart/form-data">
	                                <div class="form-group">
	                                    <label>品牌名</label>
	                                    <input class="form-control" value="{{$brand->bname}}" name="bname">
	                                </div>
	                               
	                                <div class="form-group">
	                                    <label>简介</label>
	                                    <input class="form-control" value="{{$brand->bdesc}}" name="bdesc">
	                                </div>
	                                <div class="form-group">
	                                    <label>折扣</label>
	                                    <input class="form-control" value="{{$brand->bdisct}}" name="bdisct">
	                                </div>
	                                  <div class="form-group">
                                     <label>折扣时间</label>
                                 		<input class="datainp form-control" id="dateinfo" type="text" placeholder="请选择" name="btime" value="{{$brand->btime}}" readonly>
									</div>
	                                <div class="form-group">
	                                    <label>链接</label>
	                                    <input class="form-control" value="{{$brand->badds}}" name="badds">
	                                </div>
	                                 <div class="form-group">
                                            <label>样式</label>
                                            <label class="radio-inline">
                                                <input name="bsize" id="optionsRadiosInline1" value="1" @if($brand->bsize == 1) checked @endif type="radio">1
                                            </label>
                                            <label class="radio-inline">
                                                <input name="bsize" id="optionsRadiosInline2" value="2" @if($brand->bsize == 2) checked @endif type="radio">2
                                            </label>
                                            <label class="radio-inline">
                                                <input name="bsize" id="optionsRadiosInline3" value="3" @if($brand->bsize == 3) checked @endif type="radio">3
                                            </label>
                                     </div>
	                               <div class="form-group">
	                                    <label>图片</label>
	                                    <input type="file" name="bpic">
                                        <img src="{{$brand->bpic}}" style="width:80px" alt="">
	                                </div>
	                                
	                                
                                    <input type="hidden" name="bid" value="{{$brand->bid}}">
	                               	{{ csrf_field() }}
	                               	<button type="submit" class="btn btn-primary">添加</button>
	                                <button type="reset" class="btn btn-danger">重置</button>
                                    
	                            </form>
	                        </div>
	                        <!-- /.col-lg-6 (nested) -->
	     
	                    </div>
	                    <!-- /.row (nested) -->
	                </div>
	                <!-- /.panel-body -->
	            </div>
	            <!-- /.panel -->
	        </div>
	        <!-- /.col-lg-12 -->
	    </div>
		    
		</div>
       </div>
       
        <!-- /.row -->
    </div>
  @endsection
 @section('js')
<script type="text/javascript">
    //jeDate.skin('gray');
    jeDate({
		dateCell:"#dateinfo",
		format:"YYYY-MM-DD hh:mm:ss",
		isinitVal:true,
		isTime:true, //isClear:false,
		minDate:"2014-09-19 00:00:00",
		// okfun:function(val){alert(val)}
	})
</script>

@endsection